home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format CD 42
/
Amiga Format AFCD42 (Issue 126, Aug 1999).iso
/
-serious-
/
comms
/
other
/
slrn
/
slrn_src
/
src
/
makefile.in
< prev
next >
Wrap
Makefile
|
1999-05-14
|
7KB
|
154 lines
# Unix Makefile for slrn -*- sh -*-
#---------------------------------------------------------------------------
# This file is divided into six configurable sections. The last two sections
# are optional: Section 5 deals with setting up slrn to read the server name
# from a file. If you are compiling this on Linux and you want it to work
# with 'term', look at the 6th section.
#-----------------------------------------------------------------------------
# 1. Choose a C compiler. It must understand prototypes.
#-----------------------------------------------------------------------------
CC = @CC@
CFLAGS = @CFLAGS@ @X_CFLAGS@
LDFLAGS = @LDFLAGS@
# Note: gcc -O2 is buggy under Linux. If you use it, include the
# -fno-strength-reduce flag!!
#-----------------------------------------------------------------------------
# 2. On a few systems, additional libraries are required.
#-----------------------------------------------------------------------------
MISCLIBS = @X_EXTRA_LIBS@ @TERMCAP@
#MISCLIBS = -lnsl -lsocket # Solaris
#MISCLIBS = -ltermcap # NeXT
#-----------------------------------------------------------------------------
# 3. Directory where the slang library, slanglib.a, is located.
# BUILD SLANG FIRST!!!! If you do not have it, get it from the same place
# you picked up slrn. The current home is space.mit.edu:/pub/davis/slang.
#-----------------------------------------------------------------------------
#Location of slang.h
SLANGINC = @SLANG_INCLUDE@#
#Location of libslang.a
SLANGLIB = @SLANG_LIB_DIR@#
# Note: The relative path names should be done with respect to OBJDIR.
#SLANGLIB = ../../../slang/$(ARCH)elfobjs# Location of shared elf library
#SLANGINC = ../../../slang/src# Location of slang.h
#SLANGLIB = $(SLANGINC)/$(ARCH)objs# Location of libslang.a
#-----------------------------------------------------------------------------
# 4. Location where object files are placed (Absolute pathnames!!)
#-----------------------------------------------------------------------------
OBJDIR = @OBJDIR@
SRCDIR = @SRCDIR@
#-----------------------------------------------------------------------------
# 5. If you want to read the server from a file, uncomment the following
# lines and edit it as appropriate. See INSTALL for more information.
# It is also possible to provide defaults for other variables such as the
# HOSTNAME, etc... by editing the slrnfeat.h file.
#-----------------------------------------------------------------------------
#NNTPSERVERFILE = -DNNTPSERVER_FILE=\"/usr/local/lib/news/nntp_server\"
#SLRNLIBDIR = -DSLRN_LIB_DIR=\"/usr/local/lib/news\"
#SLRNLIBDIR = -DSLRN_LIB_DIR=\"$(HOME)/lib/slrn\"
#----------------------------------------------------------------------------
# 6. Uncomment the following lines for Linux Term compatability.
#MISCLIBS += -ltermnet
#MISCINCLUDES = -include /usr/local/include/termnet.h
#---------------------------------------------------------------------------
# Installation
#---------------------------------------------------------------------------
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_OWNER = # -o root -g root
prefix = @prefix@
exec_prefix = @exec_prefix@
BINDIR = @bindir@
DOCDIR = $(prefix)/doc/slrn
MANDIR = @mandir@
MACRODIR = @datadir@/slrn
# Files to install in DOC_DIR:
README_FILES = help.txt INSTALL README.vms README.os2 README.GroupLens \
README.macros FAQ SCORE_FAQ score.txt score.sl \
os2keys.txt slrn.rc README.w95 w95keys.txt pc-keys.txt \
slrn-doc.html slrnfuns.txt
#----------------------------------------------------------------------------
# Nothing below here should require changing.
#----------------------------------------------------------------------------
SHELL = /bin/sh
OBJS = @PROGRAM_OBJECTS@
OFILES = @PROGRAM_OFILES@
EXEC = slrn
CONFIG_H = config.h
ALL_CFLAGS = $(CFLAGS) -Dunix -I$(SLANGINC) \
$(MISCINCLUDES) $(NNTPSERVERFILE) $(SLRNLIBDIR)
EXECLIBS = -L$(SLANGLIB) -lslang $(MISCLIBS) -lm
DOT_O_DEPS = slrnfeat.h
server_O_DEP = clientlib.c spool.c nntp.c sltcp.c nntplib.c
chmap_O_DEP = chmap.h charmaps.h
chkslang_O_DEP = config.h Makefile
slrnpull_O_DEP = score.c xover.c hash.c
slrnpull_DEPS = $(OBJDIR)/util.o $(OBJDIR)/ttymsg.o $(OBJDIR)/version.o\
$(OBJDIR)/sltcp.o $(OBJDIR)/nntplib.o $(OBJDIR)/slrndir.o
slrnpull_LIBS = $(slrnpull_DEPS)
UUDECODE_OBJS = $(OBJDIR)/util.o $(OBJDIR)/ttymsg.o $(OBJDIR)/slrndir.o
#
COMPILE_CMD = $(CC) -c $(ALL_CFLAGS)
#
all: $(EXEC)
$(EXEC): $(OBJDIR) $(CONFIG_H) slangversion $(OBJDIR)/$(EXEC)
@echo $(EXEC) created in $(OBJDIR)
$(OBJDIR)/$(EXEC): $(OBJS)
cd $(OBJDIR); $(CC) $(OFILES) -o $(EXEC) $(LDFLAGS) $(EXECLIBS)
#
$(OBJDIR):
-mkdir $(OBJDIR)
#
$(CONFIG_H) : $(SRCDIR)/sysconf.h
/bin/cp $(SRCDIR)/sysconf.h $(CONFIG_H)
touch $(CONFIG_H)
#
slangversion: $(OBJDIR)/chkslang
$(OBJDIR)/chkslang $(EXEC) 10003
#
$(OBJDIR)/chkslang: $(OBJDIR)/chkslang.o
$(CC) $(OBJDIR)/chkslang.o -o $(OBJDIR)/chkslang
uudecode: uudecode.c $(UUDECODE_OBJS)
$(CC) $(ALL_CFLAGS) -DSTANDALONE $(LDFLAGS) -o uudecode uudecode.c $(UUDECODE_OBJS) $(EXECLIBS)
touch uudecode.c
clean:
/bin/rm -f $(OBJDIR)/* *~
distclean: clean
/bin/rm -rf $(OBJDIR) Makefile sysconf.h
install: all $(BINDIR)
$(INSTALL) -m 755 $(INSTALL_OWNER) $(OBJDIR)/slrn $(BINDIR)
-$(INSTALL) -m 755 $(INSTALL_OWNER) $(OBJDIR)/slrnpull $(BINDIR)
$(INSTALL) -d $(DOCDIR) -m 755 $(INSTALL_OWNER)
cd ../doc; $(INSTALL) -m 644 $(INSTALL_OWNER) $(README_FILES) $(DOCDIR)
$(INSTALL) -m 644 $(INSTALL_OWNER) ../COPYRIGHT $(DOCDIR)
$(INSTALL) -m 644 $(INSTALL_OWNER) ../COPYING $(DOCDIR)
$(INSTALL) -m 644 $(INSTALL_OWNER) ../README $(DOCDIR)
$(INSTALL) -m 644 $(INSTALL_OWNER) ../changes.txt $(DOCDIR)
$(INSTALL) -m 644 $(INSTALL_OWNER) ../doc/slrn.1 $(MANDIR)/man1
$(INSTALL) -d $(DOCDIR)/slrnpull -m 755 $(INSTALL_OWNER)
$(INSTALL) -m 644 $(INSTALL_OWNER) ../slrnpull/* $(DOCDIR)/slrnpull
$(INSTALL) -d $(MACRODIR) -m 755 $(INSTALL_OWNER)
$(INSTALL) -m 644 $(INSTALL_OWNER) ../macros/*.sl $(MACRODIR)
$(BINDIR):
- ../mkinsdir.sh $(BINDIR)
# The symlinks target is for my own private use. It simply creates the object
# directory as a symbolic link to a local disk instead of an NFS mounted one.
symlinks:
-/bin/rm -f $(ARCH)objs
mkdir -p $(HOME)/sys/$(ARCH)/objs/slrn/src
ln -s $(HOME)/sys/$(ARCH)/objs/slrn/src $(ARCH)objs
#---------------------------------------------------------------------------
# Rules (automatically generated)
#---------------------------------------------------------------------------